<?php
/*
$this->breadcrumbs=array(
	'Catalogs'=>array('index'),
	$model->cid,
);
 */

$this->menu=array(
	array('label'=>'List Catalog', 'url'=>array('index')),
	array('label'=>'Create Catalog', 'url'=>array('create')),
	array('label'=>'Update Catalog', 'url'=>array('update', 'id'=>$model->cid)),
	array('label'=>'Delete Catalog', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->cid),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Catalog', 'url'=>array('admin')),
);

function parentname($parentid){
	$parentmodel = Catalog::model()->findByPk($parentid);
	return $parentmodel->cataname;
}

?>

<h1>View Catalog #<?php echo $model->cid; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'cid',
		'cataname',
		array(               // related city displayed as a link
            'label'=>'Parent Catalog',
            'type'=>'text',
            'value'=>parentname($model->parentid),
        ),
		'extra',
	),
)); ?>
